package com.binc.testspring.common.exceptions;

import reactor.util.function.Tuple2;

public class BaseRuntimeException extends RuntimeException {
    private String errorCode;

    public BaseRuntimeException(Tuple2<String, String> code) {
        super((String)code.getT2());
        this.errorCode = (String)code.getT1();
    }

    public BaseRuntimeException(Tuple2<String, String> code, Throwable throwable) {
        super((String)code.getT2(), throwable);
        this.errorCode = (String)code.getT1();
    }

    public BaseRuntimeException(String errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public BaseRuntimeException(String errorCode, String message, Throwable throwable) {
        super(message, throwable);
        this.errorCode = errorCode;
    }

    public BaseRuntimeException(String message) {
        super(message);
    }

    public BaseRuntimeException() {
    }

    public String getErrorCode() {
        return this.errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
}

